<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>修改开盘</title>
<base target="_self" />

<link href="http://localhost:8080//wanda_java2/ht/Styles/css.css"
	rel="stylesheet" type="text/css" />
<link href="http://localhost:8080//wanda_java2/ht/Styles/ts_css.css"
	rel="stylesheet" type="text/css" />
<script
	src="http://localhost:8080/wanda_java2/ht/Scripts/My97DatePicker/WdatePicker.js"
	type="text/javascript"></script>
<script
	src="http://localhost:8080/wanda_java2/ht/Scripts/jquery-1.4.1.min.js"
	type="text/javascript"></script>
<script
	src="http://localhost:8080/wanda_java2/ht/Scripts/IndexManager.js"
	type="text/javascript"></script>

<script type="text/javascript">
	function page_Close() {
		if (window.parent != null) {
			window.paraent.close();
		} else {
			window.close();
		}
	}

	//查询项目
	$.ajax({
			url : "http://localhost:8080/wanda_java2/qt/ht/project/selectAlls.do",
			datatype : 'json',
			error : function(data) {
				alert("出错了！！");
			},
			success : function(data) {
				//alert("成功了");	    	   
				var len = data.msg.length;
				var select = document.getElementById("project_id");
				var project_id = $("#proid").val();
				//alert(project_id);
				var html = "";
				if (len > 0) {
					data.ms.forEach(function(e) {
							if (e.project_id == project_id) {
								//alert(e.project_name);
								html += "<option value="+e.project_id+" selected='selected'>"
										+ e.project_name + "</option>";
							} else {
								html += "<option value="+e.project_id+">"
										+ e.project_name + "</option>";
							}
						})
						//alert(html);
					$("#project_id").append(html);
				}
			}
		});
</script>

</head>
<body>
	<form method="post" action="http://localhost:8080/wanda_java2/ht/report/update" id="form1">
		<div id="divTwo">
			<table width="100%" border="0" cellpadding="2" cellspacing="2" class="table_list1">
				<h2 align="center">修改开盘信息</h2>
				<tr>
					<td width="40%" class="table_list1_style1">
						<p></p>
					</td>
					<td width="60%" class="table_list1_style2"></td>
				</tr>
				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 开盘报告名称:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="opening_report_name" id="opening_report_name" type="text" id="txtLeved"
						value="${openings.opening_report_name}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>
				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 开盘报告类型:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="report_type" id="report_type" type="text" id="txtLeved"
						value="${openings.report_type}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>
				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 开盘时间:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="opening_report_time" id="opening_report_time" type="text" id="txtLeved"
						value="${openings.opening_report_time}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>
				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 开盘项目:
					</td>
					<td width="50%" class="table_list1_style2"><input
						type="hidden" id="proid" name="proid" value="${openings.project_id}" />
						<select name="project_id" id="project_id" id="txtLeved"
						class="aspNetDisabled" style="width: 200px; height: 18px">
					</select></td>
				</tr>

				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 房间状态:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="state" id="state" type="text" id="txtLeved"
						value="${openings.state}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>

				<!-- 取ID的值  不需要显示 -->
				<input name="opening_report_id" id="opening_report_id" type="hidden"
					value="${openings.opening_report_id}" />

				<tr>
					<td width="20%" class="table_list1_style1">
						<p></p> <span style="color: Red">*</span> 计价方式:
					</td>
					<td width="50%" class="table_list1_style2"><input
						name="price_type" id="price_type" type="text" id="txtLeved"
						value="${opening.price_type}" class="aspNetDisabled"
						style="width: 200px; height: 18px" /></td>
				</tr>

				<input type="text" name="update_user" id="update_user"
					value="${bean.name}" />
				</td>

				<tr>
					<td width="20%" class="table_list1_style1">
						<!-- <p></p> <span style="color: Red">*</span> 修改时间: -->
					</td>
					<td width="50%" class="table_list1_style2"><input
						type="hidden" name="update_time" id="update_time"
						value="${openings.update_time}" style="width: 200px; height: 24px" /></td>
				</tr>

				<tr>
					<td class="table_list1_style1">&nbsp;</td>
					<td class="table_list1_style2">
						<p></p> <input type="submit" id="send" name="btnAdd" value="修改"
						tabindex="1" class="button" /> &nbsp;&nbsp; <input id="btnBack"
						type="button" class="button" value="关闭" onclick="page_Close()" />
					</td>
				</tr>

			</table>
		</div>
	</form>
</body>
</html>